<?php
namespace Admin\Controller;

class IndexController extends AdminController {
    public function index(){
        
        $usernum = M('user')->count();
        $articlenum = M('article')->count();
        $answernum = M('answer')->count();
        $questionnum = M('question')->count();


        // var_dump($usernum);
        // echo session('admin_user.name');

        // session(null);exit;

        $this->assign('usernum',$usernum);
        $this->assign('questionnum',$questionnum);
        $this->assign('answernum',$answernum);
        $this->assign('articlenum',$articlenum);
        $this->assign('name',session('admin_user.name'));
        $this->display('Index/index');
    }
}